{extend name="wap/default_new/base" /}
{block name="goodsHead"}{/block}
{block name="resources"}
<link rel="stylesheet" type="text/css" href="__TEMP__/{$style}/public/css/member_index.css">
<style>
.head{border-bottom:0;}
.member{width: 64%;float: right;margin-top: 26px;color:#fff;}
.img{width:100%;margin: 5px 0;}
.code{background: #fff;overflow: hidden;}
.rec{height: 17px;padding: 10px 20px;border-bottom: 1px solid #f1f1f1;line-height:17px;}
.module-icon.memberCoupon {background:url(__TEMP__/{$style}/public/images/Coupon.png) no-repeat;width: 22px;height: 22px;float: left;margin-top: 9px;margin-right: 10px;display: inline-block;background-size:100% 100%;}
.member-info{background: rgba(255,79,79, 0.8);float:left;width:33%;color: #fff;text-align: center;line-height:41px;}
.vertical-bar{border-left: 1px solid rgba(250,250,250,0.6);height: 32px;vertical-align: middle;display: inline-block;margin-top:5px;}
.namer{position: absolute;left: 103px;top: 30px;}
.signin{border-radius: 3px;font-size: 10px;line-height: 14px;padding: 2px 9px;float: left;position: absolute;left: 20px;top: 5px;}
.no{color: #FF4E00!important;background: yellow!important;}
.yes{color: yellow;border: 1px solid yellow;}
.last a{position: relative;}
.tips{width: 16px;height: 16px;background: #F93F40;border:1px solid #F93F40;border-radius: 50%;font-size: 6px;line-height: 16px;text-align: center;color: #fff;position: absolute;z-index: 10;right: -10px;top: -6px;}
.member_foot{width: 100%;height: 20px;background: url("__TEMP__/{$style}/public/images/member_foot.png") center no-repeat;background-size: 100% 20px;}
</style>
{/block}
{block name="main"}
<div class="panel memberhead">
	<div class="member_head">
		<a href="javascript:;">
			<p style="margin: 20px 0 10px 0;position:relative;">
				{if condition="$integralconfig['sign_integral'] eq 1"}
					{if condition="$isSign eq 0"}
					<span class="signin no" onclick="signIn();">{:lang('sign_in')}</span>
					{else /}
					<span class="signin yes">{:lang('signed_in')}</span>
					{/if}
				{/if}

				<i class="face_img" onclick="location.href='{:__URL('APP_MAIN/member/personaldata?shop_id='.$shop_id)}'">
				{eq name="member_img" value="0"}
					<img src="{:__IMG($default_headimg)}" />
				{else/}
					<img src="{:__IMG($default_headimg)}" class="lazy_load" data-original="{:__IMG($member_img)}" />
				{/eq}
				</i>
				<span class="account_management"  onclick="location.href='{:__URL('APP_MAIN/member/personaldata?shop_id='.$shop_id)}'">账户管理<i class="data-go"></i></span>
			</p>
		</a>
		<p class="info-content-top">
			<span>{:lang('member_balance')}</span>
			<span>{$member_info["user_info"]['nick_name']}</span>
			<span>{:lang('goods_integral')}</span>
		</p>
		<p class="info-content-bottom">
			<a href="{:__URL('APP_MAIN/member/balancewater?shop_id='.$shop_id)}"><span>{$member_info['balance']}</span></a>
			<span>{notempty name="$member_info['level_name']"}<mark class="level">{$member_info['level_name']}</mark>{/notempty}</span>
			<a href="{:__URL('APP_MAIN/member/integralwater?shop_id='.$shop_id)}"><span>{$member_info['point']}</span></a>
		</p>
	</div>
	<div class="member_foot"></div>
</div>
<div class="code">
	<a href="{:__URL('APP_MAIN/'.$promoter_center)}">
		<div class="rec" style="position: relative;">
			<span>{:lang('promotion_center')}</span>
			<span class="jiantou"></span>
		</div>
	</a>
	
	{if condition="$promoter_info != null"}
	<a href="{:__URL('APP_MAIN/distribution/teamlist?promoter_id='.$promoter_info['promoter_id'])}">
		<div style="width:49%;float:left;padding:10px 0;">
			<img src="__TEMP__/{$style}/public/images/team.png" style="width:45px;height:45px; margin: 0 8px 0 20px;float:left;"/>
			<span>
				<span>{$counts}人</span>
				<br/>
				<span style="font-size:12px;color: #7B7B7B;">{:lang('my_corporate')}</span>
			</span>
		</div>
	</a>
	<a href="{:__URL('APP_MAIN/distribution/usershopcommission?shop_id='.$shop_id)}">
		<div style="width:50%;float:right;padding:10px 0;">
			<img src="__TEMP__/{$style}/public/images/yongjin.png" style="width:45px;height:45px; margin: 0 8px 0 17px;float:left;"/>
			<span>
				<span>{$commission_cash}</span>
				<br/>
				<span style="font-size:12px;color: #7B7B7B">{:lang('my_commission')}</span>
			</span>
		</div>
	</a>
	{else/}
		{if condition="$apply_promoter_menu !=null"}
		<div class='member_list' style='margin-bottom:0;'>
			<ul style="margin-top:0;">
				<li>
					<a href="{:__URL('APP_MAIN/'.$apply_promoter_menu['url'])}">
						<i class=" module-icon {$apply_promoter_menu.class}" ></i>
						<span >{$apply_promoter_menu.title}</span>
						<span class='jiantou'></span>
					</a>
				</li> 
			</ul>
		</div>
		{/if}
	{/if}
</div>

<div class="control">
	<div class="control_l">
		<span class="control_l_content selected" data-flag="regular-orders">{:lang('regular_orders')}</span>
	</div>
	<div class="control_r"><a href="{:__URL('APP_MAIN/order/myorderlist?shop_id='.$shop_id)}" class="right_href">{:lang('member_view_all_orders')}</a></div>
</div>

<div class="panel member-nav js-regular-orders">
	<ul class="fu clear" >
		<li class="last" >
			<a href="{:__URL('APP_MAIN/order/myorderlist?status=0&shop_id='.$shop_id)}">
				<img src="__TEMP__/{$style}/public/images/member_icon/pay.png">
				{if condition="$unpaidOrder neq 0"}
					<div class="tips">{$unpaidOrder}</div>
				{/if}
				<p>{:lang('member_pending_payment')}</p>
			</a>
		</li>
		<li class="last">
			<a href="{:__URL('APP_MAIN/order/myorderlist?status=1&shop_id='.$shop_id)}">
				<img src="__TEMP__/{$style}/public/images/member_icon/send.png">
				{if condition="$shipmentPendingOrder neq 0"}
				<div class="tips">{$shipmentPendingOrder}</div>
				{/if}
				<p>{:lang('member_shipment_pending')}</p>
			</a>
		</li>
		<li class="last">
			<a href="{:__URL('APP_MAIN/order/myorderlist?status=2&shop_id='.$shop_id)}">
				<img src="__TEMP__/{$style}/public/images/member_icon/recieve.png">
				{if condition="$goodsNotReceivedOrder neq 0"}
				<div class="tips">{$goodsNotReceivedOrder}</div>
				{/if}
				<p>{:lang('member_goods_received')}</p>
			</a>
		</li>
		<li class="last">
			<a href="{:__URL('APP_MAIN/order/myorderlist?status=3&shop_id='.$shop_id)}">
				<img src="__TEMP__/{$style}/public/images/member_icon/received.png">
				<p>{:lang('member_received_goods')}</p>
			</a>
		</li>
		<li class="last">
			<a href="{:__URL('APP_MAIN/order/myorderlist?status=4&shop_id='.$shop_id)}">
				<img src="__TEMP__/{$style}/public/images/member_icon/reback.png"/>
				{if condition="$refundOrder neq 0"}
				<div class="tips">{$refundOrder}</div>
				{/if}
				<p>{:lang('refund_after_sale')}</p>
			</a>
		</li>
	</ul>
</div>

{if condition="$is_open_virtual_goods"}
<div class="panel member-nav js-virtual-orders" style="display:none;">
	<ul class="fu clear" style="background: #ffffff;">
		<li class="last" >
			<a href="{:__URL('APP_MAIN/order/myvirtualorderlist?status=0&shop_id='.$shop_id)}">
				<img src="__TEMP__/{$style}/public/images/pay.png">
				{if condition="$unpaidOrder neq 0"}
					<div class="tips">{$unpaidOrder}</div>
				{/if}
				<p>{:lang('member_pending_payment')}</p>
			</a>
		</li>
		<li class="last">
			<a href="{:__URL('APP_MAIN/order/myvirtualorderlist?status=5&shop_id='.$shop_id)}">
				<img src="__TEMP__/{$style}/public/images/recieved.png">
				{if condition="$virtual_wait_evaluate neq 0"}
					<div class="tips">{$virtual_wait_evaluate}</div>
				{/if}
				<p>{:lang('member_pending_evaluation')}</p>
			</a>
		</li>
	</ul>
</div>
{/if}

<div class='member_list'>
{volist name="menu_arr" id="arr_item" }
	<ul>
		{volist name="arr_item" id="vo"}
			{notempty name="$vo['url']"}
			<li>
				<a href="{:__URL('APP_MAIN/'.$vo['url'])}">
					<i class="member-icon icon_{$vo.class}"></i>
					<span >{$vo.title}</span>
				</a>
			</li>
			{/notempty}
		{/volist}
	</ul>
{/volist}
</div>
<script type="text/javascript">
$(function(){
	bottomActive('#bottom_member');
	$(".control_l_content").click(function(){
		var flag = $(this).attr("data-flag");
		$(".js-regular-orders").hide();
		$(".js-virtual-orders").hide();
		$(".js-" + flag).show();
		$(".control_l_content").removeClass("selected");
		$(this).addClass("selected");
		if(flag == "regular-orders"){
			$(".right_href").attr("href","{:__URL('APP_MAIN/order/myorderlist?shop_id='.$shop_id)}");
		}else{
			$(".right_href").attr("href","{:__URL('APP_MAIN/order/myvirtualorderlist?shop_id='.$shop_id)}");
		}
	});
})	
function signIn(){
	$.ajax({
		type : "post",
		url : "{:__URL('APP_MAIN/member/signIn')}",
		data : { "sign" : true },
		success : function(data){
			if(data['code']>0){
				$(".signin").not(":hidden").removeClass("no").addClass("yes").text("已签到");
			}
		}
	})
}
</script>
{/block}